package com.cnap.config;

import com.cnap.CnapApplicationTests;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * <类文件描述>
 *
 * @author xc
 **/
class DockerConfigTest extends CnapApplicationTests {

    @Autowired
    private DockerConfig dockerConfig;

    @Test
    void getHarborToken() {
        String token = dockerConfig.getHarborToken();

        Assertions.assertNotNull(token);
    }

    @Test
    void getDeleteImageUrl() {
        String imageName = "172.25.4.80/test-81/admin/spark-cpc:1.0";
        String deleteUrl = dockerConfig.getDeleteImageUrl(imageName);

        Assertions.assertNotNull(deleteUrl);
    }

    @Test
    void getDeleteRepositoryUrl() {
        String imageName = "172.25.4.80/test-81/admin/spark-cpc:1.0";
        String deleteUrl = dockerConfig.getDeleteRepositoryUrl(imageName);

        Assertions.assertNotNull(deleteUrl);
    }
}